package Factory

import "factory/models"

//工厂方法
const (
	FrontUser = iota //普通用户
	AdminUser        //管理员用户
)

type UserType int

func CreateUser(t UserType) models.CreatUserfunc {
	switch t {
	case AdminUser:
		return models.NewAdmin()
	case FrontUser:
		return models.NewUser()
	default:
		return models.NewUser()
	}
}
